<template>
	<w-container class=' plr-16' :loading="loading">
		<w-navbar id="my-nav" bgColor="#fff" :title="title"></w-navbar>
		<view class="pt-20">
			<view class="font-color-textPrimary">
				{{info.title}}
			</view>
			<view class="flex flex-ai-center ptb-8 font-size-12 mb-16 font-color-textPrimary" style="border-bottom: 1px solid rgba(0, 0, 0, 0.05); color: rgb(115, 124, 127);">
				<!-- <text class="mr-12">{{category}}</text> -->
				<text class="mr-12 font-color-666">{{ appConfig.appName }}</text>
				<text>{{info.create_time}}</text>
			</view>
			<u-parse :content='info.content' :tagStyle="tagStyle"></u-parse>
		</view>
	</w-container>
</template>

<script>
	import {
		getNewsDetails
	} from '@/api/notice/index.js'
	export default {
		data() {
			return {
				title: '新闻发声',
				loading: false,
				info: {},
				category:'',
				tagStyle:{
					// p:"color:#fff",
					// span:"color:#fff"
				}
			}
		},
		onLoad({
			id,
			category
		}) {
			this.category = category
			this.getInfo(id)
		},
		methods: {
			getInfo(id) {
				this.loading = true
				getNewsDetails(id).then(res => {
					this.loading = false;
					this.info = res.data;
				})
			}
		}
	}
</script>

<style>
</style>
